int countDigits(int num) {
	int cnt = 0;
	int tmp = num;
	while (tmp) {
		if (num % (tmp % 10) == 0)
			cnt++;
		tmp /= 10;
	}
	return cnt;
}